import XCTest
import Shared

class Tests: XCTestCase {
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    func testExample() {
        dPrint("hello")
        3.times { (value) in
            dPrint(value)
        }
        // This is an example of a functional test case.
        XCTAssert(true, "Pass")
    }
    
    func testPerformanceExample() {
        // This is an example of a performance test case.
        self.measure() {
            // Put the code you want to measure the time of here.
        }
    }
    
    func testQrcode() throws{
        let image = Qrcode.from(text:"14 124312").size(300).icon(UIColor.red.trans2Image(), size: CGSize(width: 100, height: 100)).image()
        let url = URL(fileURLWithPath: "qrcode.png")
        print(url.absoluteString)
        try image.pngData()?.write(to: url)
    }
    
}
